<div id="text"></div>

<pre>
<script language="javascript" src="../js/Ajax.js"></script>
<script language="javascript">

var filename = window.location.href.replace(/[^\/]+$/, '') + 'Ajax-demo-1.txt';

var text = 'Something for nothing';

text = Ajax.queryFile(filename, {
	async: false,
	onreadystate: function(xmlhttp)
	{
		if ( xmlhttp.readyState != 4 ) {
			return;
		}

		return xmlhttp.responseText;
	}
});

document.getElementById('text').innerHTML = text;

</script>
</pre>

